//
// Created by Dell on 2021/11/28.
//
#include <iostream>

using namespace std;
int exGod(int a,int b,int &x,int &y){
    if(b == 0){
        x = 1;
        y = 0;
        return a;
    }
    int g = exGod(b,a%b,x,y);
    int temp = x;
    x = y;
    y = temp - a/b * y;
    return g;
}

int main(){
    int x,y,c;
    int gcd = exGod(12,26,x,y);
    printf("%d %d",x,y);
    scanf("%d",&c);
    printf("%d %d",c*x/gcd,c*y/gcd);
    return 0;
}